/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.edu.ifrn.controlador;

import br.edu.ifrn.dao.AdministradorDAO;
import br.edu.ifrn.dominio.Administrador;
import java.sql.SQLException;
import java.util.LinkedList;

/**
 *
 * @author CASA
 */
public class ControladorAdministrador {
    
    public static void adicionarAdministrador(Administrador ad) throws SQLException{
        AdministradorDAO res = new AdministradorDAO();
        res.insertAdmininistrador(ad);
    }
    
    public boolean deletarAdministrador(int id) throws SQLException{
        AdministradorDAO res = new AdministradorDAO();
        res.deleteAdministrador(id);
        
        return true;
    }
    
    public static LinkedList pesquisarAdministrador(int id) throws SQLException{
        AdministradorDAO res = new AdministradorDAO();
        LinkedList res2 = res.selectAdministradorById(id);
        
        return res2;
    }
    
}
